function populateFields(row) {
	document.getElementById("idCandidateComment").value = row.cells[0].innerHTML;
	document.getElementById("comment").value = row.cells[1].innerHTML;
	document.getElementById("username").value = row.cells[2].innerHTML;
}

function validateFields() {
	var comment = document.getElementById("comment");

	if (comment.value == "") {
		alert(document.getElementById("emptycomment").name);
		document.getElementById("comment").focus();
		return false;
	}
	return true;
}

function activeClick() {
	var savedUsername = document.getElementById("savedUsername");
	var username = document.getElementById("username");
	if(savedUsername.value == username.value){
		document.getElementById("editComment").disabled = false;
		document.getElementById("deleteComment").disabled = false;
	}
	if(savedUsername.value != username.value){
		document.getElementById("editComment").disabled = true;
		document.getElementById("deleteComment").disabled = true;
	}

}